﻿@inject IStringLocalizer<AutoCompleteShowLabel> Localizer

<p>@((MarkupString)Localizer["Description"].Value)</p>
<Divider Text="@Localizer["Divider1Text"]" Alignment="Alignment.Left" style="margin: 2rem 0;"></Divider>
<ValidateForm Model="@Model">
    <AutoComplete Items="@StaticItems" @bind-Value="@Model.Name" ShowLabel="true"/>
</ValidateForm>
<Divider Text="@Localizer["Divider2Text"]" Alignment="Alignment.Left" style="margin: 2rem 0;"/>
<AutoComplete Items="@StaticItems" @bind-Value="@Model.Name" ShowLabel="false"/>
<Divider Text="@Localizer["Divider3Text"]" Alignment="Alignment.Left" style="margin: 2rem 0;"></Divider>
<AutoComplete Items="@StaticItems" @bind-Value="@Model.Name" DisplayText="@Localizer["AutoText"]" ShowLabel="true"/>

@code {
    private Foo Model { get; set; } = new Foo() { Name = "" };
    private static List<string> StaticItems => new() { "1", "12", "123", "1234", "12345", "123456", "abc", "abcdef", "ABC", "aBcDeFg", "ABCDEFG" };
}
